import { defineStore } from 'pinia'
export const centerStore = defineStore('centerStore', {
	//定义state
	state: () => {
		return {
			isCollapse: false //false 团圆   true团长
		}
	},
	//定义getters
	getters: {
		getCollapse: (state) => {
			return state.isCollapse
		}
	},
	//定义actions
	actions: {
		setCollapse() {
			this.isCollapse = !this.isCollapse
		}
	},
	persist: {
		enabled: true,
		strategies: [{ storage: localStorage, paths: ['isCollapse'] }]
	}
})
